/*TMODJS:{"version":12,"md5":"262cc6d01637f8bc625bf5c9de5991a3"}*/
template('survey_question_edit',function($data,$id) {
var $helpers=this,$escape=$helpers.$escape,name=$data.name,type=$data.type,tag=$data.tag,$each=$helpers.$each,options=$data.options,$value=$data.$value,$index=$data.$index,include=function(id,data){data=data||$data;var $text=$helpers.$include(id,data,$id);$out+=$text;return $text;},$out='';$out+='<div class="row well question" id="question-editor" style="margin-top:20px"> <div class="col-xs-12"> <div class="" style="margin-bottom: 10px;"> 题目标题:<input type="text" value="';
$out+=$escape(name);
$out+='" id="question-name" class="qname"> <div class="btn-group pull-right"> <!-- <a class="btn btn-default btn-xs btn-change-to-input" ';
if(type == 2||type == 3){
$out+='style="display:none;"';
}
$out+='>变为输入</a> <a class="btn btn-default btn-xs btn-change-to-select" ';
if(type == 1||type == 2){
$out+='style="display:none;"';
}
$out+='>变为选择</a> -->  <a class="btn btn-default btn-xs btn-qdesc">描述</a> <a class="btn btn-default btn-xs btn-qpic">配图</a> <a class="btn btn-default btn-xs btn-qview">查看</a>  </div> </div> <div class="row"> <div class="col-xs-12"> <input type="text" class="form-control" id="question-tags" placeholder="input tag" data-role="tagsinput" value="';
$out+=$escape(tag);
$out+='"> </div> </div> ';
if(type == 1|| type ==2){
$out+=' <div class="row" id="option-select"> <div class="col-xs-12"> <label class="checkbox-inline"> <input type="checkbox">包含输入 </label> <label class="checkbox-inline"> <input type="checkbox">支持答案 </label> <label class="checkbox-inline"> <input type="checkbox">设置选项分值 </label> <label class="checkbox-inline"> <input type="checkbox">设置题目分值 </label> <label class="checkbox-inline"> <input type="checkbox">多选 </label> <select name="" id=""> <option value="">1</option> <option value="">2</option> </select> </div> </div> <table class=\'table\' id="question-option-list"> ';
$each(options,function($value,$index){
$out+=' ';
include('./survey_option_edit',$value);
$out+=' ';
});
$out+=' </table> <a class="btn btn-primary btn-xs btn-block btn-oadd">添加选项</a> ';
}
$out+=' ';
if(type == 3|| type ==4){
$out+=' <div class="row" id="option-input"> <div class="col-xs-12"> 输入格式： <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> 身份证 </label> <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> 电话 </label> <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> 地址 </label> <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> IP地址 </label> <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> 超链接 </label> <label class="radio-inline"> <input type="radio" id="" name="input-limit" value="0"> 自定义 </label> <span style="display:none;"><input type="text" class="form-control"></span> </div> </div> ';
}
$out+=' </div> </div>';
return new String($out);
});